*** Settings ***
Library           Selenium2Library
Resource          ../../../../CommonVars/Locations/SITSYS/MoudleView/LRelationPartView/LAppliRelationPartView/LAppliRelationPartView.robot
Library           ../../../../CommonLibs/FDataFactors/DFactors.py
Resource          ../../../../CommonVars/DataVariables/VRelationParts/VAppliRelationPart/VRelationPart.robot
Resource          ../../../OpElements/OpElements.robot

*** Keywords ***
Op Appli Relation Person
    [Arguments]    ${TypeCode}    ${name1}    ${RealtionPersonPartType}    ${Businesscode}
    #滚动
    Scroll Element In View    ${AppliOwnerCode}
    #被保险人类型 个人
    Select From List By Value    ${AppliOwnerCode}    ${TypeCode}
    ${name}=    PersonName
    run keyword if    '${TypeCode}' == '${VTypeCode}[0]'    input text    ${Appliname}    ${name}
    ...    ELSE    input text    ${Appliname}    ${name1}
    #证件类型
    run keyword if    '${TypeCode}' == '${VTypeCode}[0]'    Select From List By Value    ${Applipresonal}    ${RealtionPersonPartType}
    ...    ELSE    Select From List By Value    ${LAppliGroup}    ${RealtionPersonPartType}
    #证件值
    ${value}=    GetDataOfIdentifyType    ${RealtionPersonPartType}
    input text    ${Appliidnum}    ${value}
    #证件有效期
    ${DexprityDate}=    Dexprity
    input text    ${Appliidexprity}    ${DexprityDate}
    #电话
    ${phone}=    Phone
    input text    ${Appliphone}    ${phone}
    #Email
    ${Email}=    Email
    input text    ${Appliemail}    ${Email}
    #邮编
    ${postid}=    Postcode
    input text    ${Applipostcode}    ${postid}
    #职业
    run keyword if    '${TypeCode}' == '${VTypeCode}[0]'    Select From List By Value    ${AppliOccupName}    ${Businesscode}
    ...    ELSE    Select From List By Value    ${LAppliBusCode}    ${Businesscode}
    #地址
    Select From List By Value    ${AppliProvinceCode}    140000
    Select From List By Value    ${AppliCityCode}    140100
    Select From List By Value    ${AppliDistrictCode}    140105
